<div class="panel panel-default">
    <div class="panel-heading">
        <i class="glyphicon glyphicon-th-list"></i> 分类
    </div>
    <div class="panel-body">
        <ul class="list-unstyled">
            <li><a href="{:url('article/index')}">全部</a></li>
            {foreach $category as $k=>$v}
            <li><a href="{:url('article/index',['cid'=>$k])}">{$v}</a></li>
            {/foreach}
        </ul>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="glyphicon glyphicon-search"></i> 搜索
    </div>
    <div class="panel-body">
        <form class="form-inline">
            <div class="form-group">
                 <div class="input-group">
                     <input type="text" class="form-control" id="keyword" placeholder="请输入关键词..." />
                     <div class="input-group-addon" id="search" style="cursor:pointer;">
                        <i class="glyphicon glyphicon-search"></i>
                     </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="glyphicon glyphicon-fire"></i> 热门
    </div>
    <div class="panel-body">
        {php $hot=db('article')->field('id,title,read_count')->where('status=1')->order('read_count DESC')->limit(10)->select()}
        <ul class="list-unstyled">
            {foreach $hot as $k=>$v}
            {php $k=$k+1}
            <li><a href="{:url('article/detail',['id'=>$v['id']])}">{$k}. {$v.title}</a><span class="pull-right">{$v.read_count}</span></li>
            {/foreach}
        </ul>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <i class="glyphicon glyphicon-tags"></i> 标签
    </div>
    <div class="panel-body">
        {php $tags=widget('common.tags')->get('', ['key'=>'sign'])}
        {foreach $tags as $sign=>$name}
        <a href="{:url('article/index', ['tag'=>$sign])}">#{$name}</a>&nbsp;&nbsp;
        {/foreach}
    </div>
</div>